


        beginningDelay = 0;
        var itemFollowingMove = null;
        $(document).ready(function(){
            $('.animateBottle').removeClass('beginning');
            $('.animateBottle').addClass('in');
            $('a').click(function(){
                $('.animateBottle.big').addClass('outRight');
                $('.animateBottle.small').addClass('beginning');
                $('.animateBottle').removeClass('in');
                
            })
            for(var s = 0;s < $('.scrollItem').length;s++){
                var dataMoveDown = $('.scrollItem')[s].getAttribute('data-bottom-top').substring($('.scrollItem')[s].getAttribute('data-bottom-top').indexOf("(") - 1,$('.scrollItem')[s].getAttribute('data-bottom-top').length - 1).split(',');
                var dataMoveTop = $('.scrollItem')[s].getAttribute('data-top-bottom').substring($('.scrollItem')[s].getAttribute('data-top-bottom').indexOf("(") - 1,$('.scrollItem')[s].getAttribute('data-top-bottom').length - 1).split(',');
                var unit = dataMoveDown[1].replace(String(parseInt(dataMoveDown[1])),'');
                $('.scrollItem')[s].moveDown = parseInt(dataMoveDown[1]);
                $('.scrollItem')[s].moveTop = parseInt(dataMoveTop[1]);
                var itemTop = $('.scrollItem')[s].getBoundingClientRect().top;
                    
                    if(itemTop >= window.innerHeight){
                        $('.scrollItem')[s].currentMoveVal = $('.scrollItem')[s].moveDown;
                        $('.scrollItem')[s].style.transform = 'translate(0,' + ($('.scrollItem')[s].currentMoveVal + unit) + ')';
                    }else if(itemTop < window.innerHeight && itemTop > -$('.scrollItem')[s].offsetHeight){
                        if($('.scrollItem')[s].className.indexOf('contrary') >= 0){
                            $('.scrollItem')[s].currentMoveVal = $('.scrollItem')[s].moveDown + ($('.scrollItem')[s].moveTop - $('.scrollItem')[s].moveDown) * ((window.innerHeight - itemTop) / (window.innerHeight + $('.scrollItem')[s].offsetHeight));
                        }else{
                            
                            $('.scrollItem')[s].currentMoveVal = $('.scrollItem')[s].moveDown - ($('.scrollItem')[s].moveDown - $('.scrollItem')[s].moveTop) * ((window.innerHeight - itemTop) / (window.innerHeight + $('.scrollItem')[s].offsetHeight));
                        }
                    
                    $('.scrollItem')[s].style.transform = 'translate(0,' + ($('.scrollItem')[s].currentMoveVal + unit) + ')';
                    }else{
                        $('.scrollItem')[s].currentMoveVal = $('.scrollItem')[s].moveTop;
                        $('.scrollItem')[s].style.transform = 'translate(0,' + ($('.scrollItem')[s].currentMoveVal + unit) + ')';
                    }
                    $('.scrollItem')[s].updating = false;
            }
            $(window).scroll(function(){   //开始监听滚动条
                clearInterval(itemFollowingMove);
                
                itemFollowingMove = setInterval(function(){
                    
                    for(var f = 0;f < $('.scrollItem').length;f++){
                        //元素距离窗口顶部高度
                        var itemTop = $('.scrollItem')[f].getBoundingClientRect().top - $('.scrollItem')[f].currentMoveVal;
                        var destination;
                        
                        if(itemTop >= window.innerHeight){
                            destination = $('.scrollItem')[f].moveDown;
                            
                        }else if(itemTop < window.innerHeight && itemTop > -$('.scrollItem')[f].offsetHeight){
                            
                            if($('.scrollItem')[f].className.indexOf('contrary') >= 0){
                                destination = $('.scrollItem')[f].moveDown + ($('.scrollItem')[f].moveTop - $('.scrollItem')[f].moveDown) * ((window.innerHeight - itemTop) / (window.innerHeight + $('.scrollItem')[f].offsetHeight));
                            }else{
                                destination = $('.scrollItem')[f].moveDown - ($('.scrollItem')[f].moveDown - $('.scrollItem')[f].moveTop) * ((window.innerHeight - itemTop) / (window.innerHeight + $('.scrollItem')[f].offsetHeight));
                            }
                        }else{
                            destination = $('.scrollItem')[f].moveTop;
                        }
                        /*if($('.scrollItem')[f].currentMoveVal == destination){
                            continue;
                        }*/
                        $('.scrollItem')[f].updating = true;
                        //举例; start:189 > destination 188.5 => 188,再次通过新的判断变为189,下次进入又会变为188 以此类推无限反复循环
                        if($('.scrollItem')[f].currentMoveVal < destination){
                            if(destination - $('.scrollItem')[f].currentMoveVal <= 1){
                                $('.scrollItem')[f].currentMoveVal = destination;
                            }else{
                                $('.scrollItem')[f].currentMoveVal = $('.scrollItem')[f].currentMoveVal + Math.ceil((destination - $('.scrollItem')[f].currentMoveVal) / 10);
                            }
                        }else{
                            if($('.scrollItem')[f].currentMoveVal - destination <= 1){
                                $('.scrollItem')[f].currentMoveVal = destination;
                            }else{
                                $('.scrollItem')[f].currentMoveVal = $('.scrollItem')[f].currentMoveVal - Math.ceil(($('.scrollItem')[f].currentMoveVal - destination) / 10);
                            }
                        }
                        
                        $('.scrollItem')[f].style.transform = 'translate(0,' + ($('.scrollItem')[f].currentMoveVal + unit) + ')';
                        if($('.scrollItem')[f].currentMoveVal == destination){
                            $('.scrollItem')[f].updating = false;
                        }
                    }
                    for(var j = 0;j < $('.scrollItem').length;j++){
                        if($('.scrollItem')[j].updating) return false;
                    }
                    
                    clearInterval(itemFollowingMove);
                },10)
            })
        })